import request from '@/utils/request'

// 查询零件列表
export function list(query) {
  return request({
    url: '/buy/buy0001/list',
    method: 'get',
    params: query
  })
}

// 删除零件信息
export function delSpa(ids) {
  return request({
    url: '/buy/buy0001/' + ids,
    method: 'delete'
  })
}

// 新增字典类型
export function addSpaById(data) {
  return request({
    url: '/buy/buy0001/add',
    method: 'post',
    data: data
  })
}

// 修改字典类型
export function updateSpaById(data) {
  return request({
    url: '/buy/buy0001/update',
    method: 'post',
    data: data
  })
}

// 查询单条零件信息
export function getSpaInfoById(data) {
  return request({
    url: '/buy/buy0001/selectById',
    method: 'post',
    data: data
  })
}

// 查询单条零件信息
export function viewPrice(data) {
  return request({
    url: '/buy/buy0001/viewPrice',
    method: 'post',
    data: data
  })
}

